package com.demo.client.model.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.demo.core.annotation.TableFieldDefaultValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @description TODO 
 * @className SysMenu
 * @author Tan-Bowen
 * @date 2021-08-16 16:40
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel ("sys_menu")
@TableName (value ="sys_menu")
public class SysMenu implements Serializable {

  private static final long serialVersionUID = 1716147070663648846L;

  @TableId(type = IdType.ASSIGN_ID)
  private Long id;

  @ApiModelProperty("名称")
  @TableFieldDefaultValue(value ="''")
  private String name;

  @ApiModelProperty("父级id")
  @TableFieldDefaultValue(value ="0")
  private Long pid;

  @ApiModelProperty("0 菜单, 1 功能接口")
  @TableFieldDefaultValue(value ="0")
  private Integer type;

  @ApiModelProperty("路径")
  @TableFieldDefaultValue(value ="''")
  private String path;

  @ApiModelProperty("全路由")
  @TableFieldDefaultValue(value ="''")
  private String router;

  @ApiModelProperty("权限标识")
  @TableFieldDefaultValue(value ="''")
  private String permissions;

  @ApiModelProperty("绑定")
  @TableFieldDefaultValue(value ="''")
  private String url;

  @ApiModelProperty("图标")
  @TableFieldDefaultValue(value ="''")
  private String icon;

  @ApiModelProperty("1启用 0禁用")
  @TableFieldDefaultValue(value ="0")
  private Integer state;

  @ApiModelProperty("排序")
  @TableFieldDefaultValue(value ="0")
  private Integer sort;

  @ApiModelProperty("创建时间")
  @TableFieldDefaultValue(value ="CURRENT_TIMESTAMP")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @TableFieldDefaultValue(value ="CURRENT_TIMESTAMP")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  @ApiModelProperty("创建人")
  @TableFieldDefaultValue(value ="0")
  private Long createUser;


}
